#include <lwan/lwan.h>
#include <lwan/lwan-mod-serve-files.h>
#include "controller/chibi.h"
#include "controller/role_mgr.h"
#include "controller/account_mgr.h"
#include "controller/update_mgr.h"
int main(void)
{
    
    const struct lwan_url_map default_map[] = {
      
        { .prefix = "/sgjm_auto_backend/api/chibi", .handler = LWAN_HANDLER_REF(chibi) },
        { .prefix = "/sgjm_auto_backend/api/role_mgr", .handler = LWAN_HANDLER_REF(role_mgr) },
        { .prefix = "/sgjm_auto_backend/api/account_mgr", .handler = LWAN_HANDLER_REF(account_mgr) },
        {.prefix="/sgjm_auto_backend/api/update_mgr",.handler=LWAN_HANDLER_REF(update_mgr)},
        { .prefix = NULL }
    };
    struct lwan l;

    lwan_init(&l);
    model_init();
    lwan_set_url_map(&l, default_map);
    lwan_main_loop(&l);
    lwan_shutdown(&l);
   model_close();
    return 0;
}
